package com.example.fx.fgViewModel

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.example.base.entity.UserInfoEntityResult
import com.example.base.mvvm.BaseViewModel
import kotlinx.coroutines.launch

class MineViewModel:BaseViewModel() {
    val success = MutableLiveData<UserInfoEntityResult>()
    val fail = MutableLiveData<String>()
    fun userInfo(){
        viewModelScope.launch {
            try {
                success.value = apiService.userInfo()
            }catch (e:Exception){
                fail.value = e.message
            }
        }
    }
}